﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using System.Text.RegularExpressions;
namespace BLL.KhachHang_HangHoa
{
 public   class BLLKhachHang
    {
     public static bool KiemTra(string s, List<KhachHang> ds)
     {
         foreach (var item in ds)
             if (item.MaKH.Trim().ToUpper() == s.Trim().ToUpper())
                 return true;
         return false;

     }
     public static bool KiemTraSoDT(string s)
     {
         string chuoi = @"^0([0-9]{1})\d{9,10}";
         Regex rs = new Regex(chuoi);
         if (rs.IsMatch(chuoi))
             return true;
         return false;
     }
    }
}
